<?php
session_start();
require_once './config/config.php';
require_once './lib/http/HTTP.php';
require_once './lib/smarty/libs/Smarty.class.php';
require_once './app/controller/controller_index.php';
require_once './app/controller/controller_auth.php';
require_once './app/model/model_dbhandler.php';

$smarty = new Smarty;
$contr_index = new Index($smarty);
$smarty -> template_dir = './app/view/index';
$smarty -> compile_dir = './lib/smarty/templates_c/index';
$smarty -> config_dir = './lib/smarty/configs/';
$smarty -> cache_dir = './lib/smarty/cache/';


if (isset($_REQUEST["login"])) {
	$contr_index -> doLogin($_REQUEST["email"], $_REQUEST["passwort"]);
}


$smarty -> display('index.tpl');
?>